<template>
	<view>
		<van-search v-model="value" placeholder="请输入搜索关键词" />
		<view v-if="!showGoods" class="center">
			<van-space>
				<van-button @click="value = '亚索'" size="small">
					亚索
					<van-icon name="cross"></van-icon>
				</van-button>
				<van-button size="small">
					阿狸
					<van-icon name="cross"></van-icon>
				</van-button>
				<van-button size="small">
					流浪法师
					<van-icon name="cross"></van-icon>
				</van-button>
			</van-space>
		</view>
		<view v-else class="center">
			<van-card
			  num="2"
			  tag="标签"
			  price="2.00"
			  desc="描述信息"
			  title="商品标题"
			  thumb="https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"
			  origin-price="10.00"
			/>

		</view>
	</view>
</template>

<script>
	import {
		ref
	} from 'vue';

	export default {
		setup() {
			const value = ref('');
			return {
				value
			};
		},
		data(){
			return {
				showGoods:false
			}
		},
		methods:{
			// 不能在methods中修改setup内的绑定数据
		}
	};
</script>

<style>
</style>
